package com.ts.api.common.constant.api;

/**
 *  API业务CODE
 *  @author Pan
 */
public enum ApiServiceCodeEnum {

    /** API接口 */
    A0001("A0001", "撞库接口"),
    A0002("A0002", "进件申请接口"),
    A0003("A0003", "进件状态查询接口"),
    A0004("A0004", "进件用户授权文档信息接口"),
    A0010("A0010", "前置撞库MD5接口"),

    /** 快手接口 */
    KUAI_SHOU_0001("KS0001", "快手接口"),
    ;

    private final String code;
    private final String name;

    private ApiServiceCodeEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static ApiServiceCodeEnum get(String code) {
        ApiServiceCodeEnum[] values = ApiServiceCodeEnum.values();
        for (ApiServiceCodeEnum apiServiceCodeEnum : values) {
            if (apiServiceCodeEnum.getCode().equals(code)) {
                return apiServiceCodeEnum;
            }
        }
        return null;
    }

}
